#ifndef IMAGE_H
#define IMAGE_H

#include <QtGui>

class Image : public QWidget{
	Q_OBJECT

	public:
		Image(QWidget *_parent = NULL, QImage * = NULL);
		~Image();

        void normalSize();
        void zoomIn();
        void zoomOut();
        void fitToWindow();

        void setAreaSize(int = 400, int = 300);

        QImage *getImage();
        void setImage(QImage *);
        void update(QImage *_img = NULL);

    private slots:
        void changeZoom(double);

    private:
        QGraphicsView *graphicView;
        QImage *image;
        double zoom;
        QDoubleSpinBox *zoomDoubleSpinBox;
};

#endif

